package com.java.cloud.consumer.controller;


import com.java.cloud.consumer.service.Consumer8002Service;
import com.java.cloud.consumer.util.JsonResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/consumer2")
public class Consumer8002Controller {
    @Resource
    private Consumer8002Service consumer8002Service;

    @GetMapping
    public JsonResult a(){
        return consumer8002Service.a();
    }

    @GetMapping("/{name}")
    public JsonResult b(@PathVariable("name") String name){
        return  consumer8002Service.b(name);
    }
}
